<?php
/**
 * Created by PhpStorm.
 * User: hehecat
 * Date: 2018/8/30
 * Time: 12:08
 */

namespace app\admin\model;


use think\Controller;
use think\Db;

class ClubModel extends Controller {

    public function getClub($admin_id) {
        $club_id = Db::table('admin')->where('adminid',$admin_id)->find()['clubid'];
        $club = Db::table('club')->where('clubid',$club_id)->select();
        return $club;
    }

    public function editVideo($club_id, $name, $src, $intro) {
        $result = Db::table('club')
            ->where('clubid', $club_id)
            ->update([
                'clubname'  => $name,
                'intro' => $intro,
                'clubimg' =>  $src,
            ]);

        return $result;
    }
    public function editVideo2($club_id, $name, $intro) {
        $result = Db::table('club')
            ->where('clubid', $club_id)
            ->update([
                'clubname'  => $name,
                'intro' => $intro,
            ]);

        return $result;
    }
}